Skip to main content

All Questions

1vote
1answer
67views

Enumerating AWS instances in Rails, with error handling

I have created a method, which is raising the same exception in case of any error: ...
Rajkaran Mishra's user avatar
0votes
1answer
66views

Ruby class to encapsulate Retrying (for instance, with email)

One of my clients sends quite a few emails a day ... I would think over 500. They are mostly reports to clients or employees. The volume has become sufficient that intermittent issues with gmail (like ...
MustModify's user avatar
4votes
2answers
238views

Optimize the CSV Upload function in Ruby On Rails

The code is working fine however, I would like to fix code after unless and can I store thread ID in the database too? Is there a way to improve performance? ...
Dinesh Saini's user avatar
4votes
1answer
2kviews

Error handling for Stripe credit card processing

I have a rails application that uses Stripe for credit card processing. Currently several exceptions are being handled anywhere a transaction takes place. The code below is being used currently in 11 ...
Antarr Byrd's user avatar
7votes
1answer
130views

Controller action to process orders and payments

I'm trying to reduce the if statements and simplify this create action. ...
mnort9's user avatar
3votes
0answers
572views

Rails app that scrapes forum using Nokogiri gem

I've built a website that scrapes a guitar forum's pages and populates Rails model. I'm using rake task along with heroku scheduler to run background scrapes every hour. On the homepage, the forum ads ...
Jamie B's user avatar
1vote
1answer
406views

How to refactor this importer to handle validation errors?

This is my importer to database from excel file. I would like to handle situations when any error raise. To not breaks whole import when one errors occurs. For example when there is duplicated record ...
tomekfranek's user avatar
8votes
2answers
6kviews

Handling nil: Trying to avoid #try

Yesterday, I introduced a bug into our codebase by calling #titleize on a string that could possibly come in as nil: ...
nickcoxdotme's user avatar

close